home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 11
/
Cream of the Crop 11-1.iso
/
editor
/
cvtmixc.zip
/
CVT2MIXC.POM
< prev
next >
Wrap
Text File
|
1995-12-08
|
6KB
|
174 lines
;
; ----------------------------------------------------
; CVT2MIXC - CONVERT UPPERCASE TEXT FILE TO MIXED CASE
; ----------------------------------------------------
;
; Do you ever get documentation or email that looks like the following
; example?
;
; HELLO JOHN, I AM WRITING TO SAY HELLO. HOW ARE YOU TODAY?
;
; Text that is all in UPPERCASE is hard to read. If it's an email letter,
; it looks as if the writer is shouting at you.
;
; CVT2MIXC converts uppercase files into mixed case. It does this in an
; "intelligent" manner: non-words, such as acronyms and serial numbers,
; are usually left untouched.
;
; The conversion is not always perfect, so the file may need a bit of
; touching up here and there. However, CVT2MIXC does most of the work
; for you. On large documents, this can save you a lot of time!
;
;
; ----------------------------------
; FINE-TUNING THE CONVERSION PROCESS
; ----------------------------------
;
; If you run into frequent "exceptions" (items that are not converted
; properly), you can edit the PEF (Properization Exceptions File) with
; a standard text editor, so that it includes the proper representation
; of specific items. For example, you might add your name, or your
; city, to ensure that these are always correctly interpreted.
;
; This script uses "GENERIC.PEF", which is included in the standard
; Parse-O-Matic package. It defines just a few standard exceptions,
; such as Dr. Mr. Mrs. and similar abbreviations.
;
;
; ----------------------------
; HOW TO INSTALL THIS POM FILE
; ----------------------------
;
; 1. Obtain a copy of the shareware program Parse-O-Matic from one of the
; following sites:
;
; CompuServe -------- PCUTIL/File Utilities, file name PAR.ZIP
; World Wide Web ---- http://www.cam.org/~pinnacl
; Free Files BBS ---- +1-514-345-8654 (2400 bps or faster)
;
; Parse-O-Matic is a flexible, programmable data tool that is compatible
; with DOS, Windows, and OS/2.
;
; 2. Install Parse-O-Matic and place it in your DOS PATH. (For details
; about the PATH command, see your DOS manual.) The best place to
; set your DOS PATH is in your AUTOEXEC.BAT file.
;
; 3. Place this file (CVT2MIXC.POM) in the same directory as Parse-O-Matic.
;
;
; --------------------------
; USING CVT2MIXC IN DOS MODE
; --------------------------
;
; At the DOS prompt, enter the command using the following format:
;
; POM CVT2MIXC <input-file> <output-file>
;
; For example:
;
; POM CVT2MIXC C:\TEMP\MAIL.TXT C:\TEMP\FIXED.TXT
;
; This will read the file MAIL.TXT and place the output in FIXED.TXT.
;
;
; -------------------------------
; USING CVT2MIXC UNDER WINDOWS 95
; -------------------------------
;
; *** PREPARATION ***
;
; 1. Create a directory named TEST on your C: drive. This will be the
; working directory. (If you want to use a different directory name,
; edit the batch file CVT2MIXC.BAT accordingly.)
;
; 2. Create a Win95 shortcut to CVT2MIXC.BAT, as follows:
; Cmd line: Enter the full path to CVT2MIXC.BAT
; For example: C:\PARSE\CVT2MIXC.BAT
; Working: Leave empty
; Batch file: Leave empty
; Shortcut key: Leave empty
; Close on Exit: Click here to put a check-mark
;
; 3. If you wish, you can click on the "Change Icon" button and assign the
; icon file we have provided in the CVT2MIXC package. The icon file is
; named CVT2MIXC.ICO.
;
; *** OPERATION ***
;
; 1. When you get a file entirely in uppercase, save a copy of it to
; C:\TEST\CVT.TXT.
;
; 2. Run the shortcut. The file C:\TEST\CVT.TXT will then contain
; the converted text.
;
;
; ------------------
; SAMPLE APPLICATION
; ------------------
;
; A sample run of this script is included in the batch file SHOWMIXC.BAT.
; To run it, make sure that Parse-O-Matic has been installed (as explained
; earlier), then run SHOWMIXC.BAT (either from Windows, or from the DOS
; prompt). This will read the input file CVT2MIXC.INP and generate the
; output file CVT2MIXC.OUT. You can then view the output file with a file
; viewer (such as Pinnacle Software's SEE utility), or by loading it into
; a generic text editor.
;
;
; ------------
; DISTRIBUTION
; ------------
;
; This POM file is Copyright (C) 1995 by Pinnacle Software (Montreal). It
; is freeware, which means that you can distribute complete and unaltered
; copies without royalties.
;
;
; -----------------
; TECHNICAL SUPPORT
; -----------------
;
; If you have any questions about Parse-O-Matic or any of our other products,
; please send email to pinnacl@cam.org, or phone us at +1-514-345-9578. We
; also invite you to visit our Web site (http://www.cam.org/~pinnacl).
;
;
;------------------------------------------------------------------------------
;
; Allow null lines
;
MINLEN "0"
;
; Save the line length
;
SET lastlen = len
SETLEN len $FLINE
;
; Fix up the line
;
BEGIN lastlen = "0"
PROPER $FLINE "IUS" "GENERIC.PEF"
ELSE
PROPER $FLINE "IS" "GENERIC.PEF"
END
;
; Fix contractions
;
CHANGE $FLINE "'VE" "'ve"
CHANGE $FLINE "'D" "'d"
CHANGE $FLINE "'S" "'s"
CHANGE $FLINE "'T" "'t"
;
; Handle hanging sentences
;
BEGIN len <> "0"
COPY endchar $FLINE len len
IF endchar = "." THEN len = "0"
IF endchar = "!" THEN len = "0"
IF endchar = "?" THEN len = "0"
END
;
; Output the line
;
OUTEND |{$FLINE}